package com.cljz.makepassenger.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * Created by apple on 2017/4/24.
 */

public class DrawMenuAdapter extends FragmentPagerAdapter {
    private ArrayList<Fragment> menuFragments;

    public DrawMenuAdapter(FragmentManager fm, ArrayList<Fragment> menuFragments) {
        super(fm);
        this.menuFragments = menuFragments;
    }

    @Override
    public int getCount() {
        return menuFragments == null ? 0 : menuFragments.size();
    }

    @Override
    public Fragment getItem(int position) {
        return menuFragments.get(position);
    }

}
